CREATE TABLE [dbo].[TTCNTB_EMPR]
(
[CO_EMPR] [dbo].[TD_VC_002] NOT NULL,
[NU_CNTB_EMPR] [dbo].[TD_IN_001_CONT] NOT NULL,
[DE_CNTB_EMPR] [dbo].[TD_VC_100] NULL,
[CO_MONE] [dbo].[TD_VC_003] NOT NULL,
[ST_GENE_ASTO] [dbo].[TD_VC_003] NOT NULL,
[NU_FACT_REDO] [dbo].[TD_NU_015_006] NOT NULL CONSTRAINT [DF__TTCNTB_EM__NU_FA__22FF2F51] DEFAULT ((1.000)),
[ID_COMP] [dbo].[TD_VC_003] NOT NULL,
[ID_VENT] [dbo].[TD_VC_003] NOT NULL,
[ID_DIFE] [dbo].[TD_VC_003] NOT NULL,
[ID_GANA_CAMB] [dbo].[TD_VC_003] NOT NULL,
[ID_PERD_CAMB] [dbo].[TD_VC_003] NOT NULL,
[ID_GANA_REDO] [dbo].[TD_VC_003] NOT NULL,
[ID_PERD_REDO] [dbo].[TD_VC_003] NOT NULL,
[ID_IMPT_RENT] [dbo].[TD_VC_003] NOT NULL,
[ID_IMPT_VENT] [dbo].[TD_VC_003] NOT NULL,
[ID_FONA] [dbo].[TD_VC_003] NOT NULL,
[ID_GEST] [dbo].[TD_VC_003] NOT NULL,
[ID_CIER] [dbo].[TD_VC_003] NOT NULL,
[ID_APER] [dbo].[TD_VC_003] NOT NULL,
[ID_AJUS_INFL] [dbo].[TD_VC_003] NOT NULL,
[ID_FLEF] [dbo].[TD_VC_003] NOT NULL,
[ID_IMPO] [dbo].[TD_VC_003] NOT NULL,
[ID_QUIN] [dbo].[TD_VC_003] NOT NULL,
[ID_CUAR] [dbo].[TD_VC_003] NOT NULL,
[ID_TRIB] [dbo].[TD_VC_003] NOT NULL,
[ID_EXTO] [dbo].[TD_VC_003] NOT NULL,
[ID_BNCO] [dbo].[TD_VC_003] NOT NULL,
[ID_DIST_CNTA] [dbo].[TD_VC_003] NULL,
[ID_DIST_AUXI] [dbo].[TD_VC_003] NOT NULL,
[ID_DIST_OSER] [dbo].[TD_VC_003] NOT NULL,
[ID_CTAS_PROD] [dbo].[TD_VC_003] NOT NULL,
[ID_CTAS_INVE] [dbo].[TD_VC_003] NOT NULL,
[ID_0001] [dbo].[TD_VC_003] NOT NULL,
[ID_0002] [dbo].[TD_VC_003] NOT NULL,
[ID_0003] [dbo].[TD_VC_003] NOT NULL,
[ID_0004] [dbo].[TD_VC_003] NOT NULL,
[ID_0005] [dbo].[TD_VC_003] NOT NULL,
[ID_0006] [dbo].[TD_VC_003] NOT NULL,
[ID_0007] [dbo].[TD_VC_003] NULL,
[ID_RENT_NDOM] [dbo].[TD_VC_003] NULL,
[ID_IIGV_PERC] [dbo].[TD_VC_003] NULL,
[ID_GAST_NGRA] [dbo].[TD_VC_003] NULL,
[ID_COBR_DIVE] [dbo].[TD_VC_003] NULL,
[ID_PROV_CODU] [dbo].[TD_VC_003] NULL,
[ID_PAGA_DIVE] [dbo].[TD_VC_003] NULL,
[ID_IMSE_CONS] [dbo].[TD_VC_003] NULL,
[CO_USUA_CREA] [dbo].[TD_VC_008_USUA] NOT NULL,
[FE_USUA_CREA] [dbo].[TD_DT_001_SIST] NOT NULL CONSTRAINT [DF__TTCNTB_EM__FE_US__23F3538A] DEFAULT (getdate()),
[CO_USUA_MODI] [dbo].[TD_VC_008_USUA] NOT NULL,
[FE_USUA_MODI] [dbo].[TD_DT_001_SIST] NOT NULL CONSTRAINT [DF__TTCNTB_EM__FE_US__24E777C3] DEFAULT (getdate())
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[TTCNTB_EMPR] ADD CONSTRAINT [CK__TTCNTB_EM__NU_CN__2116E6DF] CHECK (([NU_CNTB_EMPR]>=(1) AND [NU_CNTB_EMPR]<=(99)))
GO
ALTER TABLE [dbo].[TTCNTB_EMPR] ADD CONSTRAINT [CK__TTCNTB_EM__ST_GE__220B0B18] CHECK (([ST_GENE_ASTO]='GEN' OR [ST_GENE_ASTO]='DIG'))
GO
ALTER TABLE [dbo].[TTCNTB_EMPR] ADD CONSTRAINT [TTCNTB_EMP_21106305621] PRIMARY KEY CLUSTERED  ([CO_EMPR], [NU_CNTB_EMPR]) ON [PRIMARY]
GO
